import datetime
import os
import time
from pathlib import Path

from utils.logging_utils import get_logger

logger = get_logger()

def get_save_model_path() -> str:
    return "trained_model_11.pth"

def get_save_distributed_data_parallel_model_path() -> str:
    return "trained_distributed_data_parallel_model_2.pth"

def get_save_distributed_encoder_decoder_conv_lstm_model_path() -> str:
    directory_path = os.path.join(get_checkpoint_directory(), "encoder-decoder-conv-lstm-model","distributed_model")
    Path(directory_path).mkdir(parents=True, exist_ok=True)
    return f"{directory_path}/encoder_decoder_conv_lstm_distributed_model_9.pth"

def get_save_encoder_decoder_conv_lstm_model_path() -> str:
    directory_path = os.path.join(get_checkpoint_directory(), "encoder-decoder-conv-lstm-model", "model")
    Path(directory_path).mkdir(parents=True, exist_ok=True)
    return f"{directory_path}/encoder_decoder_conv_lstm_model_2.pth"

def get_save_encoder_decoder_conv_lstm_model_checkpoint_path() -> str:
    path = Path(__file__).parent.parent.parent / f"checkpoint/encoder-decoder-conv-lstm-model/checkpoint/"
    Path(path).mkdir(parents=True, exist_ok=True)
    logger.info(f'encoder-decoder-conv-lstm-summary path : {path}')
    return f"{path}/model-2025-04-29.checkpoint"
    # return f"{path}/{datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d_%H-%M-%S')}_model.checkpoint"

def get_checkpoint_directory():
    path = Path(__file__).parent.parent.parent / f"checkpoint/"
    return path